/* App.css */
:root {
  --primary-color: #1890ff;
  --hover-color: #40a9ff;
  --border-color: #d9d9d9;
  --gray: #f5f5f5;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
  background-color: #f0f2f5;
  padding: 20px;
  color: rgba(0, 0, 0, 0.85);
}

.resource-selector {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* 分类按钮 */
.category-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  margin-right: 8px;
  margin-bottom: 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.category-btn:hover {
  background-color: var(--gray);
}

.category-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.primary-categories {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
}

.secondary-categories {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* 筛选区域 */
.filter-section {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
}

.filter-label {
  font-size: 14px;
  min-width: 60px;
  color: rgba(0, 0, 0, 0.85);
  font-weight: 500;
}

.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-item {
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.format-item:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.format-item.selected {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* 颜色选择 */
.color-filter {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.color-circle.selected {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--primary-color);
}

/* 其他元素 */
.results-count {
  font-size: 14px;
  margin: 16px 0;
  padding: 8px 0;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
}

.action-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.action-btn.primary {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
}

.action-btn.primary:hover {
  background-color: var(--hover-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .primary-categories, 
  .secondary-categories,
  .formats {
    flex-wrap: wrap;
  }
  
  .filter-section {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .filter-label {
    margin-bottom: 8px;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
    margin-bottom: 8px;
  }
}